/*
 * File: Fu_RotAngObs.h
 *
 * Code generated for Simulink model 'Fu_RotAngObs'.
 *
 * Model version                  : 1.496
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sat Jun 08 20:33:25 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Fu_RotAngObs_h_
#define RTW_HEADER_Fu_RotAngObs_h_
#ifndef Fu_RotAngObs_COMMON_INCLUDES_
# define Fu_RotAngObs_COMMON_INCLUDES_
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "rtw_shared_utils.h"
#endif                                 /* Fu_RotAngObs_COMMON_INCLUDES_ */

#include "Fu_RotAngObs_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint16_T Memory2_PreviousInput;      /* '<S2>/Memory2' */
  uint16_T Memory_PreviousInput;       /* '<S4>/Memory' */
  uint16_T Loc_TblHallsens[7];         /* '<S3>/Fu_RotAngObs_Hallsensor_Calc' */
  uint16_T Memory_PreviousInput_c;     /* '<S2>/Memory' */
  int16_T Memory3_PreviousInput;       /* '<S2>/Memory3' */
  int16_T Memory1_PreviousInput;       /* '<S2>/Memory1' */
  uint8_T Memory2_PreviousInput_o;     /* '<S4>/Memory2' */
  uint8_T Memory1_PreviousInput_h;     /* '<S4>/Memory1' */
  uint8_T is_active_c1_Fu_RotAngObs;   /* '<S1>/Fu_RotAngObs_StatesMachine' */
  uint8_T is_c1_Fu_RotAngObs;          /* '<S1>/Fu_RotAngObs_StatesMachine' */
  uint8_T is_active_c2_Fu_RotAngObs;   /* '<S3>/Fu_RotAngObs_Hallsensor_Calc' */
  uint8_T is_c2_Fu_RotAngObs;          /* '<S3>/Fu_RotAngObs_Hallsensor_Calc' */
  boolean_T Memory_PreviousInput_ch;   /* '<S3>/Memory' */
  boolean_T Memory1_PreviousInput_c;   /* '<S3>/Memory1' */
  boolean_T Memory2_PreviousInput_m;   /* '<S3>/Memory2' */
  boolean_T Memory_PreviousInput_i;    /* '<S7>/Memory' */
  boolean_T Memory_PreviousInput_p;    /* '<S6>/Memory' */
  boolean_T Fu_RotAngObs_AngObsv_MODE; /* '<S1>/Fu_RotAngObs_AngObsv' */
} D_Work_Fu_RotAngObs;

/* Real-time Model Data Structure */
struct RT_MODEL_Fu_RotAngObs {
  const char_T * volatile errorStatus;
};

/* Block states (auto storage) */
extern D_Work_Fu_RotAngObs Fu_RotAngObs_DWork;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern uint16_T AngObs_AngRamp;        /* '<S4>/Memory' */
extern uint16_T RotAngObs_AngHall;     /* '<S3>/Fu_RotAngObs_Hallsensor_Calc' */
extern uint16_T RotAngObs_AngMdl;      /* '<S2>/Memory' */
extern int16_T RotAngObs_SpdRaw;       /* '<S2>/MinMax' */
extern uint8_T RotAngObs_NRamp;        /* '<S4>/Memory2' */
extern uint8_T AngObs_StAngLern;       /* '<S1>/Fu_RotAngObs_StatesMachine' */
extern uint8_T Coord_IndRotPos;        /* '<S1>/Fu_RotAngObs_StatesMachine' */
extern boolean_T RotAngObs_FlgHallAngVld;/* '<S3>/Logical Operator' */
extern boolean_T RotAngObs_FlgPosErrShtDwn;/* '<S1>/Fu_RotAngObs_StatesMachine' */
extern boolean_T RotAngObs_FlgHallsensLernd;/* '<S3>/Fu_RotAngObs_Hallsensor_Calc' */
extern boolean_T RotAngObs_FlgAngLernd;/* '<S6>/Memory' */

/* Model entry point functions */
extern void Fu_RotAngObs_initialize(void);
extern void Fu_RotAngObs_step(void);

/* Real-time Model object */
extern struct RT_MODEL_Fu_RotAngObs *const Fu_RotAngObs_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Fu_RotAngObs'
 * '<S1>'   : 'Fu_RotAngObs/Fu_RotAngObs'
 * '<S2>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_AngObsv'
 * '<S3>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_Hallsensors'
 * '<S4>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_RampGenerator'
 * '<S5>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_StatesMachine'
 * '<S6>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_AngObsv/Fu_RotAngObs_AngLerndCrit'
 * '<S7>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_AngObsv/RisingEdge'
 * '<S8>'   : 'Fu_RotAngObs/Fu_RotAngObs/Fu_RotAngObs_Hallsensors/Fu_RotAngObs_Hallsensor_Calc'
 */
#endif                                 /* RTW_HEADER_Fu_RotAngObs_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
